package com.twu.biblioteca.controllers;


import com.twu.biblioteca.models.User;
import com.twu.biblioteca.models.UserDAO;

public final class ConsoleInfo extends Console {

    @Override
    public void run() {
        User loggedUser = UserDAO.getLoggedUser();
        this.io.getOutput().append("\n\nProfile\n");
        this.io.getOutput().append("\nNumber: " + loggedUser.getNumber());
        this.io.getOutput().append("\nName: " + loggedUser.getName());
        this.io.getOutput().append("\nEmail Address: " + loggedUser.getEmail());
        this.io.getOutput().append("\nPhone Number: " + loggedUser.getPhone() + "\n");

        System.out.println(this.io.getOutput());
        this.io.getOutput().delete(0, this.io.getOutput().length());

        new ConsoleMainMenu().run();
    }
}
